#!/usr/bin/env python3
# Copyright (c) 2021 Qtclass Open Source Team. All rights reserved.
# SPDX-License-Identifier: MulanPSL-2.0
#
# Authors               Contact
# canopen               canopensrc@163.com
#
"""
This is qtclass script
"""

import sys
import os
import configparser

base_path = os.path.abspath(os.path.dirname(__file__) + "/..")
if base_path not in sys.path:
    sys.path.append(base_path)

from libs import gitee

class Qtclass(gitee.Gitee):
    """
    QtClass commands to gitee
    """
    def __init__(self, token=""):
        if token == "":
            conf_file = os.path.expanduser("~/.qtcrc")
            if os.path.isfile(conf_file):
                conf = configparser.ConfigParser()
                conf.read(conf_file)
                token = conf.get("gitee", "token")
        super(Qtclass, self).__init__(token)


if __name__ == "__main__":
    pass
